﻿// Copyright (c) Inossem. All rights reserved.
// Licensed under the LGPL-3.0 license. See LICENSE file in the project root for full license information.
using NuGet.Common;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DWF.Studio.NuGetManagement
{
    internal class TextLogger : LoggerBase
    {
        public bool IsOutput
        {
            get;
            set;
        }

        public override void Log(ILogMessage message)
        {
            if (this.IsOutput)
            {
                Console.WriteLine(message);
            }
        }

        public async override Task LogAsync(ILogMessage message)
        {
            if (this.IsOutput)
            {
                Console.WriteLine(message);
                await Task.CompletedTask;
            }
        }
    }
}
